package demo1;

import java.util.Stack;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 石方旭
 * Date: 2022-06-29
 * Time: 17:13
 */
public class TestStack {

    public static void main(String[] args) {

        String str = "qghjk";

//        MyStack stack = new MyStack();
//        stack.push(1);
//        stack.push(2);
//        stack.push(3);
//        stack.push(4);
//        stack.push(5);
//        stack.push(6);
//        System.out.println(stack.pop());//6
//        System.out.println(stack.size());//5
//        System.out.println(stack.peek());//5
//        System.out.println(stack.empty());//false
    }


    public static void main1(String[] args) {
        Stack<Integer> stack = new Stack<>();
        stack.push(1);
        stack.push(2);
        stack.push(3);
        stack.push(4);
        stack.push(5);
        stack.push(6);
        System.out.println(stack.pop());
        System.out.println(stack.size());
        System.out.println(stack.peek());
        System.out.println(stack.empty());

    }

}
